{% extends 'layout.html' %}


{% block content %}

	<div class="navbar_con">
		<div class="navbar">
			<h1 class="fl">全部商品分类</h1>
			<ul class="navlist fl">
				<li><a href="http://127.0.0.1:8000/home/">首页</a></li>
			</ul>
		</div>
	</div>

	<div class="center_con clearfix">
		<ul class="subnav fl">
			<li><a href="http://127.0.0.1:8000/type/list/1/0/" class="fruit">新鲜水果</a></li>
			<li><a href="http://127.0.0.1:8000/type/list/2/0/" class="seafood">海鲜水产</a></li>
			<li><a href="http://127.0.0.1:8000/type/list/3/0/" class="meet">猪牛羊肉</a></li>
			<li><a href="http://127.0.0.1:8000/type/list/4/0/" class="egg">禽类蛋品</a></li>
			<li><a href="http://127.0.0.1:8000/type/list/5/0/" class="vegetables">新鲜蔬菜</a></li>
			<li><a href="http://127.0.0.1:8000/type/list/6/0/" class="ice">速冻食品</a></li>
		</ul>
		<div class="slide fl">
			<ul class="slide_pics">
                     {% for item in slide_show_data %}
                           <li><a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img style="width: 800px;height: 300px" src="/static/img/{{ item.img }}" alt="幻灯片"></a></li>
                     {% endfor %}
			</ul>
			<div class="prev"></div>
			<div class="next"></div>
			<ul class="points"></ul>
		</div>
		<div class="adv fl">
			<a href="http://127.0.0.1:8000/type/list/5/0/"><img src="/static/img/activity.jpg" style="width: 250px;height: 280px"></a>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model01">新鲜水果</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a style="color: #4cae4c" href="#">本周热销</a>
			</div>
			<a href="http://127.0.0.1:8000/type/list/1/0/" class="goods_more fr" id="fruit_more">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/img/goods_img/fruit_logo.jpeg"></div>

                <ul class="goods_list fl">
                     {% for item in fruit_data %}
                        <li>
                            <h4><a href="http://127.0.0.1:8000/detail/{{ item.id }}/">{{ item.title }}</a></h4>
                            <a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img src="/static/img/{{ item.img }}"></a>
                            <div class="prize">¥ {{ item.price }}</div>
                        </li>
                     {% endfor %}
                </ul>

		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model02">海鲜水产</h3>
			<div class="subtitle fl">
				<span>|</span>
                <a style="color: #4cae4c" href="#">本周热销</a>
			</div>
			<a href="http://127.0.0.1:8000/type/list/2/0/" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/img/goods_img/seafood_logo.jpeg"></div>
			<ul class="goods_list fl">
				{% for item in seafood_data %}
                        <li>
                            <h4><a href="http://127.0.0.1:8000/detail/{{ item.id }}/">{{ item.title }}</a></h4>
                            <a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img src="/static/img/{{ item.img }}"></a>
                            <div class="prize">¥ {{ item.price }}</div>
                        </li>
                {% endfor %}
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model03">猪牛羊肉</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a style="color: #4cae4c" href="#">本周热销</a>
			</div>
			<a href="http://127.0.0.1:8000/type/list/3/0/" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/img/goods_img/meat_logo.jpg"></div>
			<ul class="goods_list fl">
				{% for item in meat_data %}
                        <li>
                            <h4><a href="http://127.0.0.1:8000/detail/{{ item.id }}/">{{ item.title }}</a></h4>
                            <a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img src="/static/img/{{ item.img }}"></a>
                            <div class="prize">¥ {{ item.price }}</div>
                        </li>
                {% endfor %}
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model04">禽类蛋品</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a style="color: #4cae4c" href="#">本周热销</a>
			</div>
			<a href="http://127.0.0.1:8000/type/list/4/0/" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/img/goods_img/egg_logo.jpeg"></div>
			<ul class="goods_list fl">
				{% for item in egg_data %}
                        <li>
                            <h4><a href="http://127.0.0.1:8000/detail/{{ item.id }}/">{{ item.title }}</a></h4>
                            <a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img src="/static/img/{{ item.img }}"></a>
                            <div class="prize">¥ {{ item.price }}</div>
                        </li>
                {% endfor %}
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model05">新鲜蔬菜</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a style="color: #4cae4c" href="#">本周热销</a>
			</div>
			<a href="http://127.0.0.1:8000/type/list/5/0/" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/img/goods_img/vegetable_logo.jpg"></div>
			<ul class="goods_list fl">
				{% for item in vegetable_data %}
                        <li>
                            <h4><a href="http://127.0.0.1:8000/detail/{{ item.id }}/">{{ item.title }}</a></h4>
                            <a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img src="/static/img/{{ item.img }}"></a>
                            <div class="prize">¥ {{ item.price }}</div>
                        </li>
                {% endfor %}
			</ul>
		</div>
	</div>

	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model06">速冻食品</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a style="color: #4cae4c" href="#">本周热销</a>
			</div>
			<a href="http://127.0.0.1:8000/type/list/6/0/" class="goods_more fr">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="/static/img/goods_img/frozenfood_logo.jpg"></div>
			<ul class="goods_list fl">
				{% for item in frozenfood_data %}
                        <li>
                            <h4><a href="http://127.0.0.1:8000/detail/{{ item.id }}/">{{ item.title }}</a></h4>
                            <a href="http://127.0.0.1:8000/detail/{{ item.id }}/"><img src="/static/img/{{ item.img }}"></a>
                            <div class="prize">¥ {{ item.price }}</div>
                        </li>
                {% endfor %}
			</ul>
		</div>
	</div>

{% endblock %}

{% block js %}
    <script type="text/javascript">

		BCSlideshow('focuspic');
		var oFruit = document.getElementById('fruit_more');
		var oShownum = document.getElementById('show_count');

		var hasorder = localStorage.getItem('order_finish');

		if(hasorder)
		{
			oShownum.innerHTML = '2';
		}

		oFruit.onclick = function(){
			window.location.href = 'list.html';
		}
	</script>
{% endblock %}